package com.zhuoyue.common.core.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zhuoyue.common.annotation.Excel;
import com.zhuoyue.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.ArrayList;
import java.util.List;

/**
 * 产品类型表 device_zy_category
 *
 * @author hewenze
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName(value = "`device_zy_category_app`")
public class TblProductCategory extends BaseEntity {
    @TableId("category_id")
    private Long categoryId;
    @TableField("parent_id")
    private Long parentId;
    @TableField("ancestors")
    private String ancestors;
    /**
     * 类别编号, 如: 0FAA, 02, 02
     */
    @Excel(name = "编号")
    @TableField("category_num")
    private String categoryNum;

    @TableField("order_num")
    private String orderNum;

    /**
     * 类别名称, 如编号为0FAA0202的名称为"强电控制盒"
     */
    @Excel(name = "类别名称")
    @TableField("category_name")
    private String categoryName;


    /**
     * 数据字典ID集合, 如 "30,31,32"
     */
    @TableField("dict_code_list")
    private String dictCodeList;
    private List<String> dictLabelList;
    /**
     * 备注
     */
    @TableField("remark")
    private String remark;

    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
    @TableField("status")
    private String status;
    @TableField("del_flag")
    private String delFlag;
    private String parentName;
    private String deptId;
    @TableField("org_code")
    private String orgCode;
    private List<TblProductCategory> children = new ArrayList<>();

    /**
     * 在线类型, (1强电 2弱电 3其他)
     */
    @Excel(name = "设备类型", readConverterExp = "1=强电,2=弱电,3=其他")
    private String onlineType;
    /**
     * 离线时间(若在线类型是3, 则不需要判断)
     */
    @Excel(name = "离线时间")
    private Integer onlineTime;
}
